package com.jdd.enterprise.api.controller.admin;

//import com.jdd.common.base.container.PageRequest;
import com.jdd.enterprise.api.dto.PageRequest;
import com.jdd.enterprise.api.vo.ApiResponse;
import com.jdd.enterprise.api.vo.PageResponse;
import com.jdd.enterprise.domain.entity.Specification;
import com.jdd.enterprise.domain.service.SpecificationService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("spec")

@CrossOrigin


public class SpecificationController {

    @Autowired
    private SpecificationService specificationService;

@PostMapping("showList")
    public ApiResponse<PageResponse<Specification>>   showList(@RequestBody PageRequest<Specification> request){


    PageResponse<Specification> specificationPageResponse = specificationService.showList(request);
    return ApiResponse.success(specificationPageResponse);


}

}
